﻿#pragma once

#include "Framework/Application.h"
#include "Output/Console.h"

#include "File/JsonUtils.h"

int main(int argc, char* argv[])
{
    auto App=NewObject<RApplication>();

    SApplicationArgument Argument;
    Argument.ExecutablePath=SPath(argv[0]);

    App->Initialize(Argument);

    CString JsonFileContent=
        UR"(
        {
            "Name":"Guo",
            "Age":18,
            "Height":1.8,
            "IsMale":true,
            "IsFemale":false,
            "Hobbies":["Game","Music","Movie"],
            "Friends":[
                {
                    "Name":"Tom",
                    "Age":18,
                    "Height":1.8,
                    "IsMale":true,
                    "IsFemale":false,
                    "Hobbies":["Game","Music","Movie"]
                },
                {
                    "Name":"Jerry",
                    "Age":18,
                    "Height":1.8,
                    "IsMale":true,
                    "IsFemale":false,
                    "Hobbies":["Game","Music","Movie"]
                }
            ]
        }
        )";

    auto Root=CJsonUtils::Parse(JsonFileContent);

    CString Content2=CJsonUtils::ToString(Root);
    WH::PrintLine(Content2);
}